package mypack.hunmoshi;


/**
 * 
 * 装饰模式 在不改变原有类的基础上添加统计叫声次数的功能
 * 
 * @author lwcui
 *
 */
public class QuckCounter implements Quackable {

	private static int count;

	private Quackable quck;

	public QuckCounter(Quackable quck) {
		this.quck = quck;
	}

	@Override
	public void quack() {
		quck.quack();
		count++;

	}

	public static int getCount() {
		return count;
	}

}
